package com.dwy2002.pojo.vo.task;

import com.dwy2002.pojo.po.base.BaseDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 任务返回类
 *
 * @author 杜伟毅
 * @version 1.0
 * @since 2025/07/14
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class TaskVO extends BaseDateTime {
    /**
     * 任务名称
     */
    private String title;

    /**
     * 任务详细描述
     */
    private String description;

    /**
     * 优先级：1-紧急重要 2-重要不紧急 3-一般
     */
    private Integer priority;

    /**
     * 任务截止日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime dueDate;

    /**
     * 责任人昵称
     */
    private String assigneeNickname;

    /**
     * 最后一次提醒时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime lastReminderAt;

    /**
     * 创建人昵称
     */
    private String creatorNickname;
    /**
     * 任务类型名称
     */
    private String taskTypeName;
}
